#include "StdAfx.h"
#include "GImage.h"


GImage::GImage( int width, int height ):
_width( width ),
_height( height )
{
	_data = new GS_COLOR[ width * height ];
}


GImage::~GImage(void)
{
	delete [] _data;
}

GImage::GS_COLOR GImage::color( byte r, byte g, byte b, byte a ){
	return RGB( r, g, b );
}

void GImage::setPixel( int x, int y, GS_COLOR c ){
	_data[ y * _width + x ] = c;
}

GImage::GS_COLOR GImage::getPixel( int x, int y ) const {
	return _data[ y * _width + x ];
}
